Home > Overview revenue-quality card (new vs returning, subs vs one-time, AOV)
Returns the “Revenue quality” card that sits in “The month’s
economics” section on Home > Overview. Splits the current
month’s paid revenue three ways: new vs returning (per-order
cohort), subscription vs one-time (presence of
subscription_id), and three AOV values (blended,
new-customer, returning-customer).
Spec decision D-4 pinned the cohort definition to a per-order
classification — a customer’s first-ever paid order is new
and every subsequent order is returning. Buyer identity is
orders.member_id (populated on every paid order — the
checkout flow mints a member row on first purchase; the
unique members(company_id, email) index keeps that identity
stable across returning purchases).
Authorizations
Bearer token authentication. Requires a company-admin token
whose role holds reports.view. Additionally, the caller's
company must have ANALYTICS_DASHBOARD enabled — otherwise
every endpoint returns 404.
Query Parameters
ISO alpha-2 code of one of the requesting company's configured
countries (see GET /countries). When present, every service
on this endpoint filters its data to that country and reports
money in the country's own currency. Omit (or send "all")
for the aggregate-across-countries view, which is the default
and matches pre-Phase-004 behavior. Unknown ISO codes or ones
the company is not configured for return 400.
"US"
Response
Revenue-quality card payload
Keyed by cohort. new is any paid order whose buyer has no
prior paid order in this company; returning is any paid
order whose buyer already has one — per-order classification
(spec decision D-4).
Keyed by subscription mode. An order is subscription when
its subscription_id is populated (both initial checkouts
and renewals); everything else is one_time.
Average order value for the current month. blended
covers all paid orders; new_customer and
returning_customer split the same set by cohort. Values
are Money strings; empty cohorts return "0.0" rather
than divide-by-zero.
ISO 4217 three-letter code (uppercase).
3"USD"